<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

<!-- Bootstrap CSS -->
<link rel="stylesheet" href="/static/bootstrap.min.css">

<!-- Loding font -->
<link href="https://fonts.googleapis.com/css?family=Montserrat:300,700" rel="stylesheet">

<!-- Custom Styles -->
<link rel="stylesheet" type="text/css" href="/static/styles.css">

<title>Home</title>
</head>

<body>

<!-- Backgrounds -->

<div id="login-bg" class="container-fluid">

  <div class="bg-img"></div>
  <div class="bg-color"></div>
</div>

<!-- End Backgrounds -->

<div class="container" id="login">
	<div class="row justify-content-center">
	<div class="col-lg-8">
	  <div class="login">

		<h1>Login</h1>
		
		<!-- Loging form -->
			  <form action="/login" method="post">
				<div class="form-group">
				  <input type="text" name="username" class="form-control" id="exampleInputEmail1" aria-describedby="emailHelp" placeholder="Enter username">
				  
				</div>
				<div class="form-group">
				  <input type="password" name="password" class="form-control" id="exampleInputPassword1" placeholder="Password">
				</div>

				  <div class="form-check">

				  <label class="switch">
				  <input type="checkbox" name="rememberMe" id="remember">
				  <span class="slider round"></span>
				</label>
				  <label class="form-check-label" for="exampleCheck1">Remember me</label>
				  
				  <label class="forgot-password"><a href="#">Forgot Password?<a></label>

				</div>
			  
				<br>
				<button type="submit" class="btn btn-lg btn-block btn-success">Sign in</button>
			  </form>
		 <!-- End Loging form -->

	  </div>Copyright &copy; 2019.Company name All rights reserved.<a target="_blank" href="http://sc.chinaz.com/moban/">&#x7F51;&#x9875;&#x6A21;&#x677F;</a>
	</div>
	</div>
</div>
<script type="text/javascript" src="https://cdn.staticfile.org/jquery/1.10.2/jquery.min.js"></script>
<script type="text/javascript">

	console.log("。。。。。。。。。。。。。。。。。。。")

	var cookies = document.cookie.split(';');
	//获取cookie
	function getCookie(mkey) {
		for (var i = 0; i < cookies.length; i++) {
			var kv = cookies[i].split('=');
			if (kv[0].trim() == mkey) {
				return kv[1].trim();
			}
		}
		return '';
	}

	window.onload = function () {
		var username = getCookie("cookie_username") || "admin";
		var password = getCookie("cookie_password");
		var remember = getCookie("cookie_remember");
		if (remember == '1') {
			$("#exampleInputEmail1").val(username);
			$("#exampleInputPassword1").val(password);
			$("#remember").prop("checked", true);
		}
	}
</script>
</body>
</html>